From 56c06a162a4f1fa624a5cc8f863f942813717a44 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20H=C3=A4rdeman?= Date: Sun, 26 Oct 2025 09:57:03 +0100 Subject: [PATCH] odhcpd: document the "ra_advrouter" option MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Might see little practical use in the field, but the option is there, so let's document it. Also align the documentation for the "ra_slaac" option. Signed-off-by: David Härdeman Link: https://github.com/openwrt/odhcpd/pull/294 Signed-off-by: Álvaro Fernández Rojas --- README.md | 4 ++-- src/router.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8e70f85..0ee2e22 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,8 @@ and may also receive information from ubus | max_valid_lifetime |string | 90m | Upper limit for the valid lifetime for a prefix | | ra_default |integer| 0 | Override default route - 0: default, 1: ignore no public address, 2: ignore all | | ra_flags |list |other-config| List of RA flags to be advertised in RA messages [managed-config\|other-config\|home-agent\|none] | -| ra_slaac |bool | 1 | Announce slaac for a prefix | +| ra_slaac |bool | 1 | Advertise that prefixes (which are <= 64 bits long) on this interface can be used for SLAAC (the "A" flag in the PIO, RFC4861, §4.6.2) | +| ra_advrouter |bool | 0 | Advertise the IPv6 address of this router in RA messages (the "R" flag in the PIO, RFC6275, §7.2) | | ra_offlink |bool | 0 | Announce prefixes off-link | | ra_preference |string | medium| Route(r) preference [medium\|high\|low] | | ra_maxinterval |integer| 600 | Maximum time allowed between sending unsolicited RA | @@ -120,7 +121,6 @@ and may also receive information from ubus | prefix_filter |string |`::/0` | Only advertise on-link prefixes within the provided IPv6 prefix; others are filtered out. [IPv6 prefix] | | ntp |list |``| NTP servers to announce accepts IPv4 and IPv6 | | upstream |list | - | TBD | -| ra_advrouter |bool | - | TBD | [//]: # "dhcpv6_raw - string - not documented, may change when generic DHCPv4/DHCPv6 options are added" diff --git a/src/router.c b/src/router.c index 46b6ce4..9b8d002 100644 --- a/src/router.c +++ b/src/router.c @@ -743,6 +743,7 @@ static int send_router_advert(struct interface *iface, const struct in6_addr *fr if (iface->ra_slaac && addr->prefix <= 64) p->nd_opt_pi_flags_reserved |= ND_OPT_PI_FLAG_AUTO; if (iface->ra_advrouter) + // RFC6275, §7.2 p->nd_opt_pi_flags_reserved |= ND_OPT_PI_FLAG_RADDR; if (i >= valid_addr_cnt || !preferred_lt) { /* -- 2.30.2